var vm = new Vue({
    el: '#pay',
    data: {
        host,
        trade_id: '',
        username: sessionStorage.username || localStorage.username,
        token: sessionStorage.token || localStorage.token,
    },
    mounted: function(){
        let token = localStorage.token;

        axios.put(this.host+'/payment/status/'+document.location.search,{}, {
            headers: {
            'Authorization': 'JWT ' + token
          },
              responseType: 'json',
              withCredentials:true,

         })
            .then(response => {
                this.trade_id = response.data.trade_id;
            })
            .catch(error => {
                console.log(error);
            })
    },
    methods: {
        // 退出
        fnQuit:function(){
            sessionStorage.clear();
            localStorage.clear();
         //    this.$router.push({path:'/'});
            location.href = 'index.html';
 
         },
    }
})